INCLUDE (FindPkgConfig)

PKG_CHECK_MODULES (DEPS REQUIRED gtk+-2.0>=2.14 gio-unix-2.0 libpanelapplet-2.0 libglade-2.0)
PKG_CHECK_MODULES (LIBGTKHOTKEY gtkhotkey-1.0)

INCLUDE_DIRECTORIES (${DEPS_INCLUDE_DIRS})
LINK_DIRECTORIES (${DEPS_LIBRARY_DIRS})
SET (LIBS ${DEPS_LIBRARIES})

IF (LIBGTKHOTKEY_FOUND)
	INCLUDE_DIRECTORIES (${LIBGTKHOTKEY_INCLUDE_DIRS})
	LINK_DIRECTORIES (${LIBGTKHOTKEY_LIBRARY_DIRS})
	SET (LIBS ${LIBS} ${LIBGTKHOTKEY_LIBRARIES})
	MESSAGE ("\n-- libgtkhotkey found at ${LIBGTKHOTKEY_LIBRARY_DIRS}. Keyboard hotkey enabled.\n")
	SET (ENABLE_GTK_HOTKEY TRUE)
ELSE (LIBGTKHOTKEY_FOUND)
	MESSAGE ("\n-- libgtkhotkey not found. Keyboard hotkey disabled.\n")
ENDIF (LIBGTKHOTKEY_FOUND)

SET (ENABLE_CONTEXT_MENU TRUE)
SET (ENABLE_HELP_DOC TRUE)

CONFIGURE_FILE ("${FILE_BROWSER_APPLET_SOURCE_DIR}/src/config.h.in" 
				"${FILE_BROWSER_APPLET_SOURCE_DIR}/src/config.h")

SET (SRCS main.c
	 panel-menu-bar.c
 	 menu-browser.c
 	 utils.c
 	 preferences.c
	 context-menu.c
	 vfs.c)

ADD_EXECUTABLE (${EXEC} ${SRCS})
TARGET_LINK_LIBRARIES (${EXEC} ${LIBS})

INSTALL (TARGETS ${EXEC} DESTINATION "${CMAKE_INSTALL_LIB_EXEC_DIR}")
